import React from 'react'
import ReactDOM from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import { Router, Route, Link, browserHistory} from 'react-router'

//import styles
import 'weui';
import 'react-weui/build/packages/react-weui.css';
import '@/styles/index.less'

import App from '@/components/App'
import Index from '@/components/pages/index'
import About from '@/components/pages/about'
import Antd from '@/components/pages/antd'
import Weui from '@/components/pages/weui'



const render = Component => {
  ReactDOM.render(
    <AppContainer>
      <Router history={browserHistory}>
        <Route path="/" component={App} />
        <Route path="index" component={Index} />
        <Route path="about" component={About} />
        <Route path="antd" component={Antd} />  
        <Route path="weui" component={Weui} />  
      </Router>
    </AppContainer>,
    document.getElementById('app')
  )
}



render(App)

if (module.hot) {
  module.hot.accept('@/components/App', () => render(App))
}